home *** CD-ROM | disk | FTP | other *** search
- // All WMP Play and Open states are defined in skins\common\WMPStates.js
-
- function InitSettings()
- {
- UpdateEQOnOff();
- }
- /*
- function eqSettings(szName, iBand1, iBand2, iBand3, iBand4, iBand5, iBand6,
- iBand7, iBand8, iBand9, iBand10)
- {
- this.name = szName;
- this.band1 = iBand1;
- this.band2 = iBand2;
- this.band3 = iBand3;
- this.band4 = iBand4;
- this.band5 = iBand5;
- this.band6 = iBand6;
- this.band7 = iBand7;
- this.band8 = iBand8;
- this.band9 = iBand9;
- this.band10 = iBand10;
- }
-
- var eqArray = new Array();
- eqArray[0] = new eqSettings("Default",0,0,0,0,0,0,0,0,0,0);
- eqArray[1] = new eqSettings("Pop",2,5,8,5,2,0,4,6,4,0);
- eqArray[2] = new eqSettings("Rock",1,4,1,3,6,3,6,7,8,9);
-
- function eqPresetChange(iWhichDir)
- {
- var iPos = giPresetPos;
- iPos = iPos + iWhichDir;
-
- if (iPos < 0)
- {
- iPos = eqArray.length -1;
- }
- else if (iPos >= eqArray.length)
- {
- iPos = 0;
- }
-
- eqSettingsList.value = eqArray[iPos].name;
- eq.gainLevel1 = eqArray[iPos].band1;
- eq.gainLevel2 = eqArray[iPos].band2;
- eq.gainLevel3 = eqArray[iPos].band3;
- eq.gainLevel4 = eqArray[iPos].band4;
- eq.gainLevel5 = eqArray[iPos].band5;
- eq.gainLevel6 = eqArray[iPos].band6;
- eq.gainLevel7 = eqArray[iPos].band7;
- eq.gainLevel8 = eqArray[iPos].band8;
- eq.gainLevel9 = eqArray[iPos].band9;
- eq.gainLevel10 = eqArray[iPos].band10;
- giPresetPos = iPos;
- }
- */
- function UpdateEQOnOff()
- {
- if (eq.bypass == true)
- {
- eqOnOffLabel.value="Off";
- }
- else
- {
- eqOnOffLabel.value="On";
- }
- }
-
- function ResetVideoSettings()
- {
- vs.brightness=0;
- vs.contrast=0;
- vs.hue=0;
- vs.saturation=0;
- }
-
- function InitMetaDataDisplay()
- {
- var MediaInfoURL = "res://wmploc.dll/Offline_MediaInfo_NowPlaying.htm";
- if(player.isOnline)
- {
- MediaInfoURL = "http://services.windowsmedia.com/cdinfo/QueryTOCNP.asp?WMPFriendly=true&cd=";
-
- if(player.CurrentPlaylist)
- {
- var TOC = player.CurrentPlaylist.GetItemInfo("TOC");
- if(TOC)
- {
- MediaInfoURL = MediaInfoURL + TOC;
- }
- }
- }
- IE1.Navigate(MediaInfoURL,0,0,0,0);
- }
-
- function settingsOnOpenStateChangeEvent()
- {
- switch (player.OpenState)
- {
- case osMediaChanging:
- ClearSamiDisplay();
- break;
- }
- }
-
- function InitSamiDisplay()
- {
- var URL = "res://wmploc.dll/SamiCaptioning.htm";
- IE1.Navigate(URL,0,0,0,0);
- }
-
- function ClearSamiDisplay()
- {
- handleScriptCommand("Text", "");
- }
-
- function handleScriptCommand(scType, Param)
- {
- var Document = 0;
- var ElemCollection = 0;
- var Element = 0;
-
- if(scType == "Text" || scType == "<Sync")
- {
- // get the HTML document
- Document = IE1.Document;
- if(Document)
- {
- // get the element collection
- ElemCollection = Document.all;
- if(ElemCollection)
- {
- // get the first element with this name
- Element = ElemCollection.item("SAMItext",0);
- }
- if(Element == 0)
- {
- // operate on the body
- Element = Document.body;
- }
- if(Element)
- {
- // set the element HTML to our
- Element.innerHTML = Param;
- }
- }
- }
- }
-